﻿using UnityEngine;
using System.Collections;
using UnityEditor;

[CustomEditor(typeof(SomeScript))]
public class SomeScriptEditor : Editor
{
	private bool isDrawDefault = true;

	public override void OnInspectorGUI ()
	{
		if (isDrawDefault) {
			DrawDefaultInspector ();
		} else {
			DrawCustomInspector ();
		}

		EditorGUILayout.HelpBox ("This is a help box!", MessageType.Info);
	}

	void DrawCustomInspector ()
	{
		SomeScript mySomeScript = target as SomeScript;
		
		mySomeScript.level = EditorGUILayout.IntField ("Level", mySomeScript.level);
		mySomeScript.health = EditorGUILayout.FloatField ("Health", mySomeScript.health);
		mySomeScript.target = EditorGUILayout.Vector3Field ("Target", mySomeScript.target);
	}
}
